<center>


<div style="clear:both;height:10px;">&nbsp;</div>
<fieldset style="width:80%">
    <legend><?php _resource('list of '.$this->params['controller']);?></legend>
    <div>
    <?php if(1){ ?>
    <div class="button"><a onclick="deactivateEditors();ajax('addContent','<?php echo $this->params['controller'] ?>/add');" href="javascript:;" title="<?php _resource('add');?>"  > <span class="icon-32-new"> </span></a></div>
    <div class="button"><a onclick="ajaxSubmit('listContent','<?php echo $this->params['controller']?>/published/0/1','multi_noneConfirm','listForm',true);" href="javascript:;" title="<?php _resource('publish');?>"  > <span class="icon-32-publish"> </span></a></div>
    <div class="button"><a onclick="ajaxSubmit('listContent','<?php echo $this->params['controller']?>/published/0/0','multi_noneConfirm','listForm',true);" href="javascript:;" title="<?php _resource('unpublish');?>"  > <span class="icon-32-unpublish"> </span></a></div>
    <div class="button"><a onclick="ajaxSubmit('listContent','<?php echo $this->params['controller'] ?>/save','','listForm',true);" href="javascript:;" title="<?php _resource('save');?>"  > <span class="icon-32-save"> </span></a></div>    
    <div class="button"><a onclick="ajaxSubmit('listContent','<?php echo $this->params['controller'] ?>/delete','delete','listForm',true);" href="javascript:;" title="<?php _resource('delete');?>"  > <span class="icon-32-trash"> </span></a></div>
    <?php } ?>
    <div style="float:right">
      <form action="#" method="post" name="filterForm" id="filterForm">
        <table width="100%">
        
       	
          <?php if($webConfig['is_multi_lang']){?> 
          <tr>
            <td align="right">
              <?php _resource('languages') ?>:
              <select onchange="ajaxSubmit('listContent','<?php echo $this->params['controller'].'/changeLocale/'?>' + this.value,null,null,true);" style="background-color:#ffffff;">
                <?php foreach(explode(',',$webConfig['langs']) as $k=>$v){
						$select='';
						if($v==$this->Session->read('adminLang')){
							$select='selected="selected"';
						}
						echo '<option value="'.$v.'" style="background: url('.$this->webroot.'img/backend/flag/'.$v.'.png'.') 3px 50% no-repeat;height:15px; padding-left:20px" '.$select.'>'.$listLang[$v].'</option>';
					}
					?>
              </select>                            
            </td>
          </tr>
           <?php }?>
          <tr>
            <td align="right">             
              <input name="filter_text" size="10" value="<?php echo $this->Session->read($uses[0].'.filterText') ?>" />
              &nbsp;&nbsp;&nbsp;&nbsp;<?php _resource('filter by') ?>:&nbsp;&nbsp;&nbsp;&nbsp;
              <select name="filter_field" id="filter_state" class="inputbox" size="1" >
                <?php 
					foreach($filterField as $k=>$v){
						$select="";
						
						if($k==$this->Session->read($uses[0].'.filterField')){							
							$select='selected="selected"';
						}
						echo '<option value="'.$k.'" '.$select.'>'.$v.'</option>';
					}?>
              </select>
              &nbsp;&nbsp;&nbsp;&nbsp;
              <input type="button" value="<?php _resource('search') ?>" onclick="ajax('listContent','<?php echo $this->params['controller'].'/filter';?>','filterForm');">
            </td>
          </tr>
        </table>
      </form>
    </div>
    <div class="clear"></div>         
    </div> 
       
    <div id="listContent">
    	<script>
    		ajax('listContent','<?php echo $this->params['controller'] ?>/lists');
    	</script>
    </div>    
</fieldset>
<div id="addContent" style="width:900px;"></div>
</center>
